package startup;

import javax.swing.JFrame;

import dbadapters.LoadEmployeesDB;
import dbadapters.LoadStudentsDB;
import dbadapters.checkConnection;

//import commands.InitializeSystem;
//import systemEntities.Printer;

import gui.LoginFrame;

/**
 * @author eks691
 */
public class Startup {
	/**
	 * Start up the student loans application.
	 */
	public static void main(String[] args) {

		// check if db is accessible
		checkConnection c = new checkConnection();

		if (c.isConnectionValid()) {
			// load system from db
			new LoadStudentsDB();
			new LoadEmployeesDB();
		} else {
			System.out.println(c.getErrorMessage());
		}
		LoginFrame frame = new LoginFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);

	}
}
